import pulpcore.Stage;
import pulpcore.animation.Easing;
import pulpcore.sprite.ImageSprite;
import pulpfizz.pulp.Camera;
import pulpfizz.pulp.FizzScene;

public class RefactoringTests extends FizzScene
{
	
	private ImageSprite img;
	private ImageSprite bigImg;
	
	@Override
	public void load()
	{
		super.load();
		Stage.setFrameRate(60);
		
		bigImg = new ImageSprite("cam-test.png",0,0);
		bigImg.scaleTo(bigImg.width.get()*5,bigImg.height.get()*5,0);
		add(bigImg);
		
		img = new ImageSprite("cam-test.png",2,2);
		img.scaleTo(img.width.get()*1,img.height.get()*1,0);
		add(img);
		
		img = new ImageSprite("cam-test.png",4,4);
		img.scaleTo(img.width.get()*.2,img.height.get()*.2,0);
		add(img);
		
		setCamera(new Camera());
	
		getCamera().x.set(2);
		getCamera().y.set(2);
//		getCamera().x.set(Stage.getWidth()/2);
//		getCamera().y.set(Stage.getHeight()/2);
		getCamera().zoom.animate(0.01,10,5000,Easing.REGULAR_IN_OUT);
	}

	@Override
	public void update(int elapsedTime)
	{
		super.update(elapsedTime);
		
		double zoom = getCamera().zoom.get();
		double imgWidth = bigImg.width.get();
		System.out.println(zoom*imgWidth);
	}
	
}
